<form class="layui-form" style="padding: 0 50px 0 0;width: 600px;" action="{:url('wendasns/answer/edit')}" method="post">
      <script type="text/html" template>
        <input type="hidden" name="id" value="{{ d.params.id || 0 }}">
      </script>
      
            <div class="layui-form-item">
              <label class="layui-form-label">问题</label>
              <div class="layui-input-block">
			      <script type="text/html" template>
			        <input type="text" value="{{ d.params.title || '' }}" class="layui-input layui-disabled" disabled>
			      </script>
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">回答者</label>
              <div class="layui-input-inline">
			      <script type="text/html" template>
			        <input type="text" value="{{ d.params.username || '' }}" class="layui-input layui-disabled" disabled>
			      </script>
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">回答</label>
              <div class="layui-input-block">
			      <script type="text/html" template lay-done="layui.data.done()">
			        <textarea id="J_textarea" style="display: none;" name="content" data-id="">{{ d.params.content || '' }}</textarea>
			      </script>
              </div>
            </div>
          
		  <div class="layui-form-item">
		    <label class="layui-form-label">点赞数</label>
		    <div class="layui-input-inline">
			      <script type="text/html" template>
			        <input type="text" name="praise" value="{{ d.params.praise || 0 }}" lay-verify="number" class="layui-input">
			      </script>
		    </div>
		  </div>
		  
		  <div class="layui-form-item">
		    <label class="layui-form-label">评论数</label>
		    <div class="layui-input-inline">
			      <script type="text/html" template>
			        <input type="text" value="{{ d.params.comment || 0 }}" class="layui-input layui-disabled" disabled>
			      </script>
		    </div>
		  </div>

		  <div class="layui-form-item">
		    <label class="layui-form-label">举报数</label>
		    <div class="layui-input-inline">
			      <script type="text/html" template>
			        <input type="text" name="report" value="{{ d.params.report || 0 }}" lay-verify="number" class="layui-input">
			      </script>
		    </div>
		  </div>

	  <div class="layui-form-item">
	    <label class="layui-form-label">发布时间</label>
	    <div class="layui-input-inline">
		      <script type="text/html" template>
		        <input id="J_create_time" type="text" name="create_time" value="{{ d.params.create_time || '' }}" class="layui-input">
		      </script>
	    </div>
	  </div>
  
	  <div class="layui-form-item">
	    <label class="layui-form-label">删除</label>
	    <div class="layui-input-inline">
			<script type="text/html" template>
	         <input type="radio" name="remove" value="1" title="是" {{ d.params.remove === 1 ? 'checked="checked"' : '' }}>
	         <input type="radio" name="remove" value="0" title="否" {{ d.params.remove === 0 ? 'checked="checked"' : '' }}>
			</script>
	    </div>
	  </div>

  <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
			<script type="text/html" template>
              <select name="status">
                <option value="normal" {{# if(d.params.status=='normal'){ }}selected="selected"{{# } }}>正常</option>
                <option value="check" {{# if(d.params.status=='check'){ }}selected="selected"{{# } }}>待审核</option>
              </select>
			</script>
            </div>
          </div>
        </div>
        
            <div class="layui-form-item">
              <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="J_ajax_submit_btn"><i class="layui-icon layui-icon-ok-circle"></i>提交</button>
              </div>
            </div>
            
          </form>

<script src="/ueditor/ueditor.init.js?v={:time()}"></script>
<script>
layui.data.done = function(){

	var layedit = layui.layedit,laydate = layui.laydate;
	layedit.set({
	  uploadImage: {
	    url: '{:url('wendasns/answer/upload')}'
	  },
	  height: 400
	});

	var index = layedit.build('J_textarea');
	layui.$('#J_textarea').attr('data-id',index);
	
	laydate.render({
    elem: '#J_create_time'
    ,type: 'datetime'
  });
}
;!function(){
  var $ = layui.$
  ,form = layui.form;
  
  form.render();

}();
</script>